<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:th="http://www.thymeleaf.org">
 
<head> 
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<title>发票补开</title> 
	
	<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/text.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/form.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/buttons.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/grid.css" type="text/css" media="screen" title="no title" />	
	<link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen" title="no title" />	
	
	<link rel="stylesheet" href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/dataTables.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../css/custom.css" type="text/css" media="screen" title="no title">
	<style type="text/css">
	#changeMessage { color:red; margin-left:150px; visibility:hidden;  }
	</style>
	<link rel="stylesheet" href="/js/jquery/sweetalert2.min.css">
	<script src="js/jquery/sweetalert2.min.js"></script>
	<script src="js/jquery/jquery-3.3.1.min.js"></script>
	<script type="text/javascript">
	
	//发票号码发生改变
	var invoiceChanged = false;
	function invoiceChange(){
		if(invoiceChanged)return;
		invoiceChanged=true;
		
		//发票号码发生改变时，要进行的处理
		$('#changeMessage').css('visibility','visible');
		$('#submit').val('修改发票号码并重新打印');
	}
	
	//提交表单
	function ok(){
        //打印发票
        alert("打印完成");
	    window.parent.swal.close();
	}
	</script>
</head> 
 
<body> 

	<form action="?" class="form label-inline uniform">
		<h2>发票补开</h2>
		<p style="margin-left:20px;">说明：
		<div class="field"><label for="name">发票类型</label>
		<input size="50" type="text" class="medium" th:value="普通发票" disabled="disabled" /></div>
		
		<div class="field"><label for="name">状态</label>
		<input size="50" type="text" class="medium" th:value="${ivInvoice.Used==0?'没使用':'已使用'}" disabled="disabled" /></div>
		
		<div class="field"><label for="name">发票号码</label>
		<input size="50" type="text" class="medium" readonly="readonly" th:value="${ivInvoice.InvoiceNo}" onKeyUp="invoiceChange();" />
		<br/>
		<span id="changeMessage">由于你修改了发票号码，此操作会将原发票号码作废，将新发票号码与交费单关联。</span></div>
		
		<div class="field"><label for="name">交费单号</label>
		<input size="50" type="text" class="medium" th:value="${pyPay.PayNo}" disabled="disabled" /></div>
		
		<div class="field"><label for="name">交费用户</label>
		<input size="50" type="text" class="medium" th:value="${user.UserName}" disabled="disabled" /></div>
		
		<div class="field"><label for="name">收费员</label>
		<input size="50" type="text" class="medium" th:value="${emp}" disabled="disabled" /></div>
		
		<div class="field"><label for="name">交费金额</label>
		<input size="50" type="text" class="medium" th:value="${pyPay.PayMoney}" disabled="disabled" /></div>
		
		<div class="field"><label for="name">交费日期</label>
		<input size="50" type="text" class="medium" th:value="${pyPay.PayDate}" disabled="disabled" /></div>
		
		<div class="buttonrow">
			<input id="submit" type="button" class="btn" value="重新打印发票" onclick="ok();"></input>
			<button type="button" class="btn btn-grey" onClick="window.parent.swal.close();">关闭</button>
		</div>
	
	</form>

<script src="../js/jquery/jquery-1.5.2.min.js"></script>
<script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="../js/misc/excanvas.min.js"></script>
<script src="../js/jquery/facebox.js"></script>
<script src="../js/jquery/jquery.visualize.js"></script>
<script src="../js/jquery/jquery.dataTables.min.js"></script>
<script src="../js/jquery/jquery.tablesorter.min.js"></script>
<script src="../js/jquery/jquery.uniform.min.js"></script>
<script src="../js/jquery/jquery.placeholder.min.js"></script>

<script src="../js/widgets.js"></script>
<script src="../js/dashboard.js"></script>

<script type="text/javascript">
	
$(document).ready ( function () 
{
	Dashboard.init ();		
});

</script>

</body> 
 
</html>